package org.artifact.core.plugin.netty;

import org.artifact.core.lang.IPlugin;
import org.artifact.core.plugin.netty.server.NettyServer;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : SandKing
 * @CreateDate : 2020/3/25 15:31
 * @Description ：Please describe this document
 */
public class NettyPlugin implements IPlugin {
    private List<NettyServer> servers = new ArrayList<>();

    @Override
    public boolean start() {
        for (NettyServer server : servers){
            server.startup();
        }
        return true;
    }

    @Override
    public boolean stop() {
        for (NettyServer server : servers){
            server.shutdown();
        }
        return true;
    }
}
